<?php
DJApi\Configs::set("API-ANME", '本地版 1.0.0');

$http = $_SERVER['REQUEST_SCHEME'] == 'https'  ? 'https' : 'http';

define('SERVER_API_ROOT', 'https://api.jdyhy.com/server/unit-1.0.0/');

DJApi\Configs::set("https", $http);

DJApi\Configs::set("main_db", [
  "medoo"=>[
    "port"          => 3306          ,
    "database_name" => 'store'   ,
    "server"        => 'localhost',
    "username"      => 'jdyhy',
    "password"      => '--------------',
    "database_type" => 'mysql'   ,
    "charset"       => 'utf8'
  ],
  "tableName" => []
]);


DJApi\Configs::set("WX_APPID_APPSEC", [
  'pgy-wx'   => ["WX_APPID" => "wx3a807a2f301479ae", "WX_APPSEC" => '--------------'],
  'pgy-web'  => ["WX_APPID" => "wxffc089a88065e759", "WX_APPSEC" => '--------------','outwx'=>1],
  'pgy'      => ["WX_APPID" => "wx3a807a2f301479ae", "WX_APPSEC" => '--------------'],
  '蒲公英'   => ["WX_APPID" => "wx3a807a2f301479ae", "WX_APPSEC" => '--------------'],
  '测试'     => ["WX_APPID" => "wx85146f512f936bbb", "WX_APPSEC" => '--------------'],
  '请高手'   => ["WX_APPID" => "wx93301b9f5ddf5c8f", "WX_APPSEC" => '--------------'],
  'cmoss'    => ["WX_APPID" => "wx93301b9f5ddf5c8f", "WX_APPSEC" => '--------------'],
  'qgs-web'  => ["WX_APPID" => "wx8fb342a27567fee7", "WX_APPSEC" => '--------------','outwx'=>1],
  'qgs-mp'   => ["WX_APPID" => "wx93301b9f5ddf5c8f", "WX_APPSEC" => '--------------'],
  'laolin-mp'=> ["WX_APPID" => "wx3dd28920a07c53de", "WX_APPSEC" => '--------------'],
]);

DJApi\Configs::set("WX_APPID_APPSEC_DEFAULT", DJApi\Configs::get(["WX_APPID_APPSEC", 'pgy-wx']));



DJApi\Configs::set(["微信模板消息", '新文本提醒'], [
  'template_id' => 'zC2wQnYUic166kv6blGAJSjJIpOjCFnKI8Y8LU0Usd4',
  "first"=>"#223388",
  'body'   => [
    ['keyword1', '#FF8800', '客户名称'],
    ['keyword2', '#FF8800', '留言内容'],
    ['keyword3', '#FF8800', '留言时间'],
  ],
  "remark"=>"#223388"
]);


DJApi\API::enable_debug(true);

DJApi\API::debug([
  DJApi\Configs::get(["API-ANME"]),
  DJApi\Configs::get(["main_db", "medoo", "database_name"])
]);

